package com.gitee.urick.union.api.controller;

import com.gitee.urick.union.entity.TestDemo;
import com.gitee.urick.union.utils.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Controller Test Demo
 *
 * @author Rick 2021/3/8 15:31
 * @since 1.0
 */
@RestController
@RequestMapping("/test")
public class TestController {

    /**
     * Test Demo 1
     *
     * @return Result
     */
    @GetMapping("/myTest")
    public Result<TestDemo> hello() {
        return Result.success(new TestDemo());
    }

    /**
     * Test Demo 2
     *
     * @param demo 接收参数
     * @return 响应参数
     */
    @GetMapping("/myTest2")
    public Result<String> hello2(TestDemo demo) {
        return Result.success();
    }
}
